import Vue from "vue";
//引入vue-router
import VueRouter from "vue-router";
Vue.use(VueRouter)

//引入文件
// import About from '../components/views/About.vue';

import Home from '../components/views/Home.vue'

//注册路由
const routes = [
    {path:'/Home',name:'Home',component:Home},
    //路由懒加载
    {path:'/About',
    name:'About',
    component:
    ()=>import(/*webpackChunkName:'about'*/'../components/views/About.vue')
    // component:About
}
]
//实例化路由
const router = new VueRouter({
    routes,
    mode:'history'
})

//导出
export default router